package Dispatch;

import Dispatch.HttpHandleImpl.HttpHandleControllerImpl;
import Dispatch.HttpHandleImpl.HttpHandleStaticResourseImpl;
import HttpBean.Request.Request;
import HttpBean.Response.Response;
import annotation.Bean;

@Bean(SingleTon = true,Alise = "Dispatch")
public class DispatcherService {
    public DispatcherService(){
        System.out.println("我已生成");
    }
    public static Response doDispatch(Request request){
        HttpHandle handle = new HttpHandleControllerImpl();
        HttpHandle handle1 = new HttpHandleStaticResourseImpl();
        handle.setNext(handle1);
        Response response = handle.resolve(request);
        return response;
    }
    public void doHandle(String httpPath){
        HttpHandle httpHandle = new HttpHandleControllerImpl();
    }
}
